package com.ruoyi.core.lock;

import java.util.Collection;
import java.util.List;

/**
 * @Author xiaom
 * @Date 2020/3/16 11:08
 * @Version 1.0.0
 * @Description <>
 **/
public interface IExpressionActuator {
    String CACHE_PREFIX = ":";
    /**
     * Lock expression execute actuator interface.
     * @param lockModel Param.
     * @return Parser's value.
     */
    Collection<String> doExecute(LockModel lockModel);

    /**
     * Lock key assembly .
     */
    static String assembly(List<String> keys, String... args){
        return String.join(CACHE_PREFIX, keys)  + CACHE_PREFIX + String.join(CACHE_PREFIX, args);
    }

}
